package com.collect.tanzania.zhiUtils.zhiApkDownload;

import android.os.Environment;

import com.collect.tanzania.zhiUtils.CryptoUtil;

import java.io.File;

import static android.os.Environment.DIRECTORY_DOWNLOADS;

public class ApkInfo {
    public int id;
    public String apkName;
    public String apkPath;
    public String apkLocalUrl;
    public String apkInstallUrl;
    public String appId;

    public ApkInfo(int id, String apkName, String apkInstallUrl){
        this.id = id;
        this.apkName = apkName;
        this.apkInstallUrl = apkInstallUrl;
        this.appId = CryptoUtil.md5(apkInstallUrl);
        this.apkPath = Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS) + File.separator;
        this.apkLocalUrl = apkPath + this.appId + ".apk";
    }
}
